$(function () {
    var result = Model.order.findAllOrder()
    model(result);
})

function model(result) {
    var gridColumns_2_2_2 = [
        {
            id: 'orderId',
            title: '订单编号',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'

        },
        {
            id: 'goodsId',
            title: '商品id',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'

        },
        {
            id: 'count',
            title: '购买数量',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'
        },
        {
            id: 'receiver',
            title: '收货人',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'
        },
        {
            id: 'area',
            title: '地区',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'
        },
        {
            id: 'address',
            title: '详细地址',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'
        },
        {
            id: 'expressnumber',
            title: '运单编号',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'
        },
        {
            id: 'pay_time',
            title: '支付时间',
            type: 'string',
            columnClass: 'text-center',
            fastQuery: true,
            fastQueryType: 'eq'
        },

    ];
    var gridOption_2_2_2 = {
        lang: 'zh-cn',
        ajaxLoad: false,
        loadAll: true,
        datas: result.ordermessages,
        columns: gridColumns_2_2_2,
        gridContainer: 'gridContainer_2_2_2',
        toolbarContainer: 'gridToolBarContainer_2_2_2',
        tools: '',
        pageSize: 5,
        pageSizeLimit: [1, 10, 20, 50]
    };
    var grid_2_2_2 = $.fn.dlshouwen.grid.init(gridOption_2_2_2);
    grid_2_2_2.load();
}
